package com.more.db.console.dao;

import com.more.db.console.mapper.DbCorpMapper;
import com.more.db.console.mapper.DbServerMapper;
import com.more.db.core.DatabaseContextHolder;
import com.more.db.core.InitDataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @ClassName DbCorpDao
 * @Description TODO
 * @Author yyliu
 * @Date 2018/12/10 17:49
 * @Version 1.0
 **/
@Component
public class DbCorpDao {

    @Autowired
    private DbCorpMapper dbCorpMapper;

    public List<Map<String, Object>> findList() {
        DatabaseContextHolder.setDatabaseType(InitDataSource.DEFAULT_DB_NAME);
        return dbCorpMapper.findList();
    }
}
